<!--  -->
<script setup>
const keyboard = ref('')
const code = ref('')
const show = ref(false)

const getCode = (cb) => {
  console.log('获取验证码')
  cb()
}

const delayed = (time = 3000) => data => new Promise((resolve) => {
  const delayedTime = setTimeout(() => {
    resolve(data)
    clearTimeout(delayedTime)
  }, time)
})
const timedelay = delayed()

const confirm = async () => {
  const data = await timedelay('我是弹框确认返回的数据')
  console.log(data)
  show.value = false
}

const url = ref('https://zyd-bucket-photo.oss-cn-beijing.aliyuncs.com/20250815/e5cf58c7ec5c4d7e9ca130ac81b704f8.jpeg')
</script>

<template>
  <!-- <page-meta :page-style="`overflow:${show ? 'hidden' : 'visible'};`" /> -->
  <div class="h-1200px">
    <wd-button @click="show = true">
      弹框
    </wd-button>
    <AppDialog v-model="show" :confirm="confirm">
      今天天气不错
    </AppDialog>

    <AppInputKeyboard v-model="keyboard" label="键盘" placeholder="请输入键盘值" />
    <AppInputCode v-model="code" label="验证码" placeholder="请输入验证码" @get-code="getCode" />

    <div class="w-100% break-all">
      {{ url }}
    </div>
    <AppUpload v-model="url" multiple />
  </div>
</template>

<style scoped lang='scss'>

</style>
